import {defineStore} from "pinia";
import {Pipe} from "../types/tanTypes/pipe";
import {Pressure} from "../types/tanTypes/pressure";

interface City {
    value: string,
    name: string
}

interface Area {
    address: string;
    instantFlow: number
}

interface PipeState {
    pipeData: Array<Pipe>;
    countAlarm: number;
    pressureAlarm: number;
    flowAlarm: number;
    waterAlarm: number;
    pressureData: Array<Pressure>;
    visible: boolean;
    scroll: boolean,
    cityData: Array<City>;
    areaPressureData: Array<Area>
}
export const usePipeStore = defineStore('pipe', {
    state: (): PipeState => ({
        pipeData: [],
        countAlarm: 0,
        pressureAlarm: 0,
        flowAlarm: 0,
        waterAlarm: 0,
        pressureData: [],
        visible: false,
        scroll: false,
        cityData: [],
        areaPressureData: []
    })

})
